<extend name="Public:layout"/>
<block name="css">
    <link rel="shortcut icon" href="__STATIC__/mobile/images/logo-icon.ico"/>
    <link rel="stylesheet" href="__STATIC__/mobile/dist/css/mzui.css?v=__STATIC_VERSION__"/>
    <link rel="stylesheet" href="__STATIC__/mobile/css/news-media.css?v=__STATIC_VERSION__"/>
</block>
<block name="js_header">
    <script src="__STATIC__/mobile/js/setRem.js?v=__STATIC_VERSION__"></script>
</block>
<block name="content">
    <div class="tt flex"><span>媒体新闻</span></div>
    <!--媒体新闻内容-->
    <section class="main flex flex-column relative">
        <!--时钟图标-->
        <span class="clock dock"><i class="dock"></i></span>
        <!--媒体新闻列表-->
        <div class="news_list">
            <foreach name="list" item="vo">
                <ul data-url="{:U('News/detail', 'cat=media&id='.$vo['article_id'])}" class="flex space-between">
                    <li class="text relative">
                        <time>{$vo.create_time|date='Y-m-d', ###}</time>
                        <p class="elps">{$vo.title}</p>
                    </li>
                    <li class="pic_show">
                        <img src="{$vo.thumb}" alt=""/>
                    </li>
                </ul>
            </foreach>
        </div>
    </section>
    <!--分页器-->
    <php>$p = I('p', 1, 'intval');</php>
    <div class="pager flex space-between align-middle">
        <div class="pageBtnWrap flex  align-middle space-between">
            <span class="pull-left {$p == 1 ? 'disable' : ''}">
                <a href="<?php echo $p  == 1 ? 'javascript:;' : U('', array_merge((array)I('get.'), ['p'=>1]));?>">首页</a>
            </span>
            <span class="prev pull-right {$p == 1 ? 'disable' : ''}">
                <a href="<?php echo $p < 2 ? 'javascript:;' : U('', array_merge((array)I('get.'), ['p'=> $p - 1]));?>">上一页</a>
            </span>
        </div>
        <div>
            <span class="cur">{$page->nowPage}</span>
            <span>/</span>
            <span class="total">{$page->totalPages}</span>
        </div>
        <div class="pageBtnWrap flex align-middle space-between">
            <span class="next {$p == $page->totalPages ? 'disable' : ''}">
                <a href="<?php echo $p >= $page->totalPages ? 'javascript:;' : U('', array_merge((array)I('get.'), ['p'=> $p + 1]))?>">下一页</a>
            </span>
            <span class="{$p == $page->totalPages ? 'disable' : ''}">
                <a href="<?php echo $p == $page->totalPages ? 'javascript:;' : U('', array_merge((array)I('get.'), ['p'=>$page->totalPages]));?>">末页</a>
            </span>
        </div>

    </div>
    <!--返回顶部-->
    <div  id="toTop" class="flex justify-end align-middle">
        <a href="#">返回顶部 <i></i></a>
    </div>
</block>
<block name="js_footer">
    <script src="__STATIC__/mobile/js/jquery-3.2.1.js?v=__STATIC_VERSION__"></script>
    <script src="__STATIC__/mobile/dist/js/mzui.js?v=__STATIC_VERSION__"></script>
    <script src="__STATIC__/mobile/js/public.js?v=__STATIC_VERSION__"></script>
    <script src="__STATIC__/mobile/js/news-media.js?v=__STATIC_VERSION__"></script>
</block>